package com.example.UserConsumer.RestController;

import com.example.UserConsumer.Entity.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component

public class UserServerRegistryHystrixtFallback implements UserFeignClient {
    private static final Logger logger = LoggerFactory.getLogger(UserServerRegistryHystrixtFallback.class);

    public User FindUserById(String id)
    {
        UserServerRegistryHystrixtFallback.logger.info("fallback reason was: {} " ,UserServerRegistryHystrixtFallback.class.getSimpleName());

        User user = new User();
        user.setAge(999);
        user.setAdress("379753498@qq.com");
        user.setName("Testdev This is UserServerRegistryHystrixtFallback CLass retrun ");
        user.setQQ("379753498");
        user.setSex("man");
        return user;
    }
}




